package com.example.nacosprovider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;

/**
 * @program: springcloud-alibaba-project
 * @author: daPangDong
 * @create: 2022-04-08 21:22
 */
@RestController
public class ProviderController {
    @GetMapping("invoke")
    public String invoke() {
        return LocalTime.now() + " invoke";
    }

    @Value("${name:da}")
    private String name;

    @Value("${ruoyi.name:a2}")
    private String name2;


    @GetMapping("invokes")
    public String invokes() {
        return LocalTime.now() + " invoke,name:" + name;
    }
    @GetMapping("/a2")
    public String a2() {
        return " name:" + name2;
    }
}
